package edu.jd.movieplatform.security.home.impl;

import edu.jd.movieplatform.common.CurrentUser;
import edu.jd.movieplatform.security.home.HomeService;
import edu.jd.movieplatform.security.home.dao.HomeDao;
import edu.jd.movieplatform.security.m_home.dao.MHomeDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class HomeServiceImpl implements HomeService {

    @Resource
    private HomeDao homeDao;

    @Override
    public void setAvatar(CurrentUser currentUser, String filename) {
        homeDao.updateAvatar(currentUser.getUserName(),filename);
    }
}
